package regulator;
import java.io.*;
public class tesy {
	public static void main(String args[]) throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String str = reader.readLine();
		int letters = 0;
		int space = 0;
		int number = 0;
		int other = 0;
		for(char ch : str.toCharArray()) {
			if('0'<=ch && ch <= '9') {
				number++;
			}
			else if(ch == ' ') {
				space++;
			}
			else if('a'<=ch  && ch <= 'z') {
				letters++;
			}
			else other++;
		}
		System.out.printf("letters=%d,space=%d,number=%d,other=%d",letters,space,number,other);
	}
	
}
